package com.qs.entities;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="Comment")
public class Comment implements Serializable{

	private static final long serialVersionUID = 375893026722257489L;
	
	public Comment(){
		
	}
	
	@Id
	@Column(name="comment_id")
	public Integer commentId;
	
	@ManyToOne
	@JoinColumn(name="feed_id")
	public Feed feed;
	
	@ManyToOne
	@JoinColumn(name="user_id")
	public User user;
	
	@Column(name="text")
	public String text;
	
	@Column(name="created_on")
	public Timestamp createdOn = new Timestamp((new Date()).getTime());
	

}
